import sys

from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtWidgets import QMessageBox

from login_code import Ui_MainWindow



class Login(QtWidgets.QMainWindow,Ui_MainWindow):
    def __init__(self):
        super(Login,self).__init__(parent=None)
        self.setupUi(self)
    def setupUi(self, Ui_MainWindow):
        super().setupUi(Ui_MainWindow)
        self.btn_close.clicked.connect(self.close)
        self.btn_login.clicked.connect(self.showmessage)


    def showmessage(self):
        QMessageBox.information(None,'提示框','欢迎您!',QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Ok)

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    login = Login()
    login.show()
    sys.exit(app.exec_())

